//new VConsole();

//点击扫一扫
$(".scan").click(function() {
	wx.scanQRCode({
		needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
		scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码，默认二者都有
		success: function(res) {
			var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
		}
	});
})
//数据查看
$(".data").click(function() {
	location.href = "dataView.html"
})
//幸运2020
$(".luck").click(function() {
	location.href = "luckUser.html"
})
//活动规则
$(".rule").click(function() {
	$(".ruleAlert").show()
})
$(".close").click(function() {
	$(".ruleAlert").hide();
		$(".prizeAlert").hide()
})
//我知道了
$(".rule_knowed").click(function() {
	$(".ruleAlert").hide()
})
//活动奖品
$(".prize").click(function(){
	$(".prizeAlert").show()
})
$(".prize_knowed").click(function(){
	$(".prizeAlert").hide()
})

//活动公告
$(".activity").click(function() {
	location.href = "notice.html"
})

//最强荷芯联盟
$(".unionBtn").click(function() {
	location.href = "strongest.html"
})
//真爱粉大挑战

$(".challenge").click(function() {
	location.href = "barrier.html"
})
//五大工艺
$(".medal").click(function() {
	location.href = "fiveCraft.html"
})
//礼品大兑换
$(".gift").click(function() {
	location.href = "exchange.html"
})
//个人中心
$(".center").click(function() {
	location.href = "personalCenter.html"
})

//function getPara(_key) {
//	var reg = new RegExp("(^|&)" + _key + "=([^&]*)(&|$)");
//	var r = window.location.search.substr(1).match(reg);
//	if(r != null) return unescape(r[2]);
//	return null;
//}

//var t_skey = getPara("skey") || "chomoo_test_001";
//
//var t_userApi = "https://hehua.ai-zuoye.cn/users/login?skey=" + t_skey;
//$.get(t_userApi, function(_res) {
//	if(_res["code"] != 0) {
//		location.href = "https://hehua.ai-zuoye.cn/project/?proId=lotus1912";
//		return;
//	}
//	console.log(_res);
//	var t_uid = _res["user"]["uid"];
//	var t_name = _res["user"]["name"];
//	var t_avatar = _res["user"]["avatar"];
//	var t_skey = _res["skey"];
//
//	window.localStorage.setItem("uid", t_uid);
//	window.localStorage.setItem("name", t_name);
//	window.localStorage.setItem("avatar", t_avatar);
//	window.localStorage.setItem("skey", t_skey);
//})
//
//if(!t_skey) {
//	location.href = "https://hehua.ai-zuoye.cn/project/?proId=lotus1912";
//}